package com.cyd.order_service.service;


import com.cyd.order_service.fallback.ProductFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * Feign 调用方法
 */

@FeignClient(name="product-server",fallback=ProductFeignClientFallBack.class)
public interface ProductFeignClient {

    @GetMapping("/api/product/findById") //注意这里一定要和提供方一致，否则掉不到
    String findById(@RequestParam(value="id") int id);
}
